package action

import (
	"comm/api/commdeal/service"
	"comm/selfreg"
	"core/action"
	"core/corestruct"
	"reflect"
)

type PageAction struct {
}

func (p *PageAction) Do(ctx *corestruct.HttpContext) (*[]corestruct.IdNameDto, error) {
	return service.MainService.List(ctx)
}

func init() {

	var mact = &PageAction{}
	var maction = action.Action{
		Method: "get",

		FullUrl: URLPrev + "/List",
		Name:    PAGEName + "列表",
		Ename:   "",
		Memo:    "",

		PinType:    "",
		PinIslist:  false,
		PoutType:   "",
		PoutIslist: false,
		PoutIspage: false,

		AuthType: action.AuthType_Login,

		LogNeed:     false,
		LogPin:      false,
		LogPout:     false,
		LogTemplete: "",

		PrjName: "",

		Value: reflect.ValueOf(mact),
	}
	selfreg.AddAction(&maction)
}
